window.vm = new Vue({
    el: '#app',
    data: {

        //表单数据
        respaAll: [],
        respaPro1: [],
        respaPro2: [],
        respaPro3: [],
        respaPro4: [],
        respaPro5: [],
        state: '',


        respa1: [],
        activeName: 'first',
        accepted: null,
        user_ticket: '',
        token: '',
        score: '',
        user: '',


    },
    methods: {



        toIndex(){
            top.location.href="index.html"
        },

        toOverRate:function (value){
            sessionStorage.setItem("processNo",JSON.stringify(value));
            top.location.href = "overRate.html"
        },


        query:function () {
            axios.get(
                "/respaProAll",{
                    params: {
                        userName: vm.user
                    },
                }
            ).then(function (res) {
                vm.respaAll=res.data
            }).catch(e => {
                ajaxError(vm, e);
            });
        },

        handleClick(tab, event) {
            // console.log(tab, event);
        },



    },
    created: function () {


        //负责人全部的工单
        axios.get(
            "/respaProAll",
        ).then(function (res) {
            vm.respaAll=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });


        //转派未接受
        axios.get(
            "/respaPro",{
                params: {
                    state: 1,
                    is: 0
                },
            }
        ).then(function (res) {
            vm.respaPro1=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });


        //转派已接受
        axios.get(
            "/respaPro",{
                params: {
                    state: 1,
                    is: 1
                },
            }
        ).then(function (res) {
            vm.respaPro2=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });


        //接受已完成
        axios.get(
            "/respaPro",{
                params: {
                    state: 2,
                    is: 1
                },
            }
        ).then(function (res) {
            vm.respaPro3=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });



        axios.get(
            "/respaProRate",{
                params: {
                    state: 2,
                    is: 1
                },
            }
        ).then(function (res) {
            vm.respaPro4=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });


        axios.get(
            "/respaProRate1",{
                params: {
                    state: 2,
                    is: 1
                },
            }
        ).then(function (res) {
            vm.respaPro5=res.data
        }).catch(e => {
            ajaxError(vm, e);
        });


    },
});